﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NEmu;
using System.IO;
using Super64.Core.Memory.Rom;

namespace Super64.Core
{
    public sealed class N64Resources : ResourceManager
    {
        private CartRom m_CurrentRom;

        public N64Resources(N64Machine parentMachine) : base(parentMachine)
        {
        }

        public override bool LoadResources()
        {
            return true;
        }

        public override void CloseResources()
        {
            m_CurrentRom.RawStream.Close();
            m_CurrentRom = null;
        }

        public void LoadRom(CartRom rom)
        {
            m_CurrentRom = rom;
        }

        public CartRom CurrentRom
        {
            get { return m_CurrentRom; }
        }
    }
}
